#ifndef SSLSOCKET_H
#define SSLSOCKET_H

#include <QObject>
#include <QSslSocket>
#include <QSslError>


class SslClient : public QObject {
    Q_OBJECT
public:
    explicit SslClient(QObject *parent = nullptr);
    ~SslClient();
    void sendRegistrationData(const QString &username, const QString &password);

signals:
    void registrationResponse(const QString &response);

private slots:
    void onSslErrors(const QList<QSslError> &errors);

private:
    QSslSocket *sslsocket;
    void loadCaCertificate(const QString &path);
};

#endif // SSLSOCKET_H
